import Vue from 'vue'
import VueRouter from "vue-router";
import Home from "@/pages/Home";
import Login from "@/pages/Login";
import Music from "@/pages/Home/Music";
import News from "@/pages/Home/News";
Vue.use(VueRouter)

export default new VueRouter({
  mode:'history',
  routes:[
    {
      path: "/",
      redirect: "/home",
    },
    {
      path:'/home',
      component:Home,
      children:[
        {
          path:'music/:id',
          component:Music
        },
        {
          path:'news',
          component:News
        }
      ]
    },
    {
      path:'/login',
      component:Login
    }
  ]
})
